package com.javastar.modules.log.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户操作日志表
 *
 * @author zxx
 * @date 2023/7/25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("novel_user_operation_log")
@ApiModel(value="用户操作日志", description="用户操作日志表")
public class UserOperationLogEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户日志主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "操作")
    private String operation;

    @ApiModelProperty(value = "请求URL")
    private String requestUri;

    @ApiModelProperty(value = "请求方式")
    private String requestMethod;

    @ApiModelProperty(value = "请求参数")
    private String requestParams;

    @ApiModelProperty(value = "请求时长(毫秒)")
    private Integer requestTime;

    @ApiModelProperty(value = "用户代理")
    private String userAgent;

    @ApiModelProperty(value = "操作IP")
    private String ip;

    @ApiModelProperty(value = "状态 0失败 1成功")
    private Integer status;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "用户昵称")
    private String userNickname;
}
